const db = require('../common/db/db')

class PhotoModel{
     amend_photo(img_url,descr){
       return new Promise((resolve,reject)=>{
        db.query('UPDATE img_banner SET descr = ? WHERE img_url = ?',[descr,img_url],(err,result)=>{
            if(err) reject(err)
            resolve(result)
        })
       })
    }
}

module.exports = PhotoModel
